<template>
    <p>初始msg:{{ message }}</p>
    <p>反转之后的msg:{{ reversedMsg }}</p>
    <button @click="updateMessage">更改</button>

</template>
<script setup>
import { ref, computed } from 'vue'
const message = ref('689')
const reversedMsg = computed(() => {// 计算属性
    return message.value.split('').reverse().join('')// 反转字符串
})
const updateMessage = () => {       
    message.value = 'niaho' // 更改message的值
}

</script>